package com.cysd.ewmxns.sdw_adapter

import android.content.Context
import android.view.ViewGroup
import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder

import com.cysd.ewmxns.sdw_bean.IndexGridBean
import qrrspeeelild.rqrc0ode.andro0ild.R


class indexGridAdapter:BaseQuickAdapter<IndexGridBean,QuickViewHolder>() {
    override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: IndexGridBean?) {
        holder.setText(R.id.tv_name,item?.name)
        holder.setText(R.id.tv_content,item?.content)
        holder.setImageResource(R.id.iv_cover,item?.cover?:0)
    }

    override fun onCreateViewHolder(
        context: Context,
        parent: ViewGroup,
        viewType: Int
    ): QuickViewHolder {
        return QuickViewHolder(R.layout.item_index_grid, parent)
    }
}